package com.mes.inventory.service;

import java.util.Collection;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.bstek.dorado.annotation.DataProvider;
import com.bstek.dorado.annotation.DataResolver;
import com.bstek.dorado.data.provider.Page;
import com.mes.common.service.BasicService;
import com.mes.inventory.dao.iface.IWarebinKeeperDao;
import com.mes.inventory.domain.WarebinKeeper;

@Service
public class WarebinkeeperService extends BasicService<WarebinKeeper>{

	@Autowired
	private IWarebinKeeperDao warebinKeeperDao;
		//genjuID查询柜位人员
		@DataProvider
		public void getWarebinKeepers(Page<WarebinKeeper> page,Map<String, Object> parameter) throws Exception{
			 if (parameter != null && !parameter.equals("") ){
			    	try {
			    		String warehouseUid = (String) parameter.get("warehouseUid");//("warehouseId");
						warebinKeeperDao.getWarebinKeeper(page, warehouseUid);
			    	} catch (Exception e) {
			    		e.printStackTrace();
			    	}
			    }
		}
		
		
		//删除
		@DataResolver
		public void deleteWarebinKeeper(Collection<WarebinKeeper> warebinKeepers) throws Exception{
				warebinKeeperDao.delete(warebinKeepers);
		}
}
			
			
			
			
			
